Repository navigation
fix(v1): offer custom and SmartPlan cleaning modes on water-slide devices - #1025
Open
paulleonartcalvo wants to merge 1 commit into
Open
paulleonartcalvo wants to merge 1 commit into
paulleonartcalvo wants to merge 1 commit into
Conversation
…ices Water-slide devices report flow as slider positions, so get_water_modes() has no CUSTOMIZED (204) or SMART_MODE (209) entry for them and get_cleaning_mode_options() dropped CUSTOM and SMART_MODE even when the feature flags are set. get_current_cleaning_mode() still classifies those states, so consumers such as Home Assistant showed an unknown cleaning mode whenever the device was in custom or SmartPlan mode. Gate both options on the feature flags alone for water-slide devices. Verified on a Qrevo Edge 3 Pro (roborock.vacuum.a296): writing 106/204/302 and 110/209/306 with set_clean_motor_mode is accepted and read back as 106/204/300 and 110/209/306. Fixes Python-roborock#977 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #977.
Problem
Water-slide devices report water flow as slider positions, so
get_water_modes()returns only the slide range for them. That list has noCUSTOMIZED(204) orSMART_MODE(209) entry, soget_cleaning_mode_options()dropsCUSTOMandSMART_MODEeven whenis_customized_clean_supported/is_smart_clean_mode_set_supportedare set.get_current_cleaning_mode()still returnscustom/smart_modefor those states, so Home Assistant's cleaning mode select showsunknownwhenever the device is in either mode, because the current value is not one of its options.Change
For water-slide devices,
CUSTOMandSMART_MODEare gated on their feature flags alone. Non-slide devices are unchanged. The existingtest_cleaning_mode_options_water_slide_deviceasserted the old behaviour; it now covers each flag combination, and there are new tests for readback and for the write payloads on slide devices.Device testing
#977 noted that writes had not been tested on hardware. On a Qrevo Edge 3 Pro (
roborock.vacuum.a296, water slide, both flags true), docked, throughset_clean_motor_mode:get_statusget_current_cleaning_modecustomsmart_modeBoth were accepted. Before this change both read back as a mode that is not in
cleaning_mode_options. The device was restored to 102 / 248 / 300 afterwards.uv run pytest(2287 passed) anduv run pre-commit run --all-filespass.🤖 Generated with Claude Code